﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace ZR.Model.Dto.Business.ProductionControl
{
    /// <summary>
    /// 三坐标接口格式
    /// </summary>
    public class CksCmmDto
    {
        /// <summary>
        /// 设备唯一编码
        /// </summary>
        public string EID { get; set; }

        /// <summary>
        /// 检测结果
        /// </summary>
        public string CheckResult { get; set; }

        /// <summary>
        /// 检测开始时间
        /// </summary>
        public long StartTime { get; set; }

        /// <summary>
        /// 检测结束时间
        /// </summary>
        public long EndTime { get; set; }

        /// <summary>
        /// 检测花费时间
        /// </summary>
        public int CostTime { get; set; }

        /// <summary>
        /// 表头参数集合
        /// </summary>
        public List<Parameter> Parameters { get; set; }

        /// <summary>
        /// 检测项参数集合
        /// </summary>
        public List<Item> Items { get; set; }
    }

    public class Parameter
    {
        /// <summary>
        /// 参数名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 参数值
        /// </summary>
        public string Value { get; set; }
    }

    public class Item
    {
        /// <summary>
        /// 检测项名称
        /// </summary>
        public string ItemName { get; set; }

        /// <summary>
        /// 标准值
        /// </summary>
        public double StandardValue { get; set; }

        public string Idsymbol { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; }

        /// <summary>
        /// 上限值
        /// </summary>
        public double USL { get; set; }

        /// <summary>
        /// 下线值
        /// </summary>
        public double LSL { get; set; }

        /// <summary>
        /// 测量值
        /// </summary>
        [JsonPropertyName(" ActualValue ")] // System.Text.Json的属性名映射
        public double ActualValue { get; set; }

        /// <summary>
        /// 检测结果 OK：合格 NG:不合格
        /// </summary>
        public string CheckResult { get; set; }
    }
}